// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    sum: number = 0;//记录点击次数，每点击一次，sum++
    sum1: string = null;
    node1: cc.Node = null;
    node1Script: cc.Component = null;

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        this.node.on('touchstart', this.onClicked, this);
    }

    onClicked(){
        this.node1 = cc.find('Canvas/气泡框3/圆环/LabelFrequency');
        this.sum = this.sum + 1;
        this.sum1 = this.sum.toString();
        this.node1.getComponent(cc.Label).string = this.sum1 + "次";

    }

    start () {

    }

    // update (dt) {}
}
